<link rel="stylesheet" href="__CDN__/assets/css/amazeui.min.css" type="text/css">
<link rel="stylesheet" href="__CDN__/assets/css/tailwind.css" type="text/css">
<div id="questionnaire" v-cloak>
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-head am-cf">
                <a href="<?= url('question_cate/index') ?>"
                   class=" ml-10  bg-green-300 px-2 py-2  rounded-lg">返回
                </a>
                <div class="widget-title am-fl">模型下问卷填写列表</div>
            </div>
            <div class="widget-body ">
                <!-- 工具栏 -->
                <div class="page_toolbar am-margin-bottom-xs am-cf">
                    <form class="toolbar-form" action="">
                        <input type="hidden" name="s" value="/">
                        <!-- <div class="am-u-sm-12 am-u-md-9 am-u-sm-push-3">
                            <div class="am fr">
                                
                               
                                <div class="am-form-group am-fl">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                        <div class="am-input-group-btn">
                                            <button class="am-btn am-btn-default am-icon-search"
                                                    type="submit"></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div> -->
                    </form>
                </div>
                <!-- 分页 -->
                <div class="am-scrollable-horizontal am-u-sm-12">
                    <table width="100%" class="bg-green-300 border-2 border-blue-400 am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap am-table-bordered ">
                        <tr>
                            <th class="am-lg-text-center">id</th>
                            <th class="am-lg-text-center">标题</th>
                            <!-- <th class="am-lg-text-center">分类</th> -->
                            <th class="am-lg-text-center">用户名</th>
            
                            <!-- <th class="am-lg-text-center">分数</th> -->
                            <!-- <th class="am-lg-text-center">是否已处理</th> -->
                            <!-- <th class="am-lg-text-center">总分</th> -->
                            <!-- <th class="am-lg-text-center">及格分</th> -->
                            <!-- <th class="am-lg-text-center">是否及格</th> -->
                            <th class="am-lg-text-center">填写时间</th>
                            <th class="am-lg-text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-if="data.total !=0" v-for="(item,index) in data.data">
                            <td class="am-text-middle am-lg-text-center">{{item.id}}</td>
                            <td class="am-text-middle am-lg-text-center">{{item.title}}</td>
                            <!-- <td class="am-text-middle am-lg-text-center">
                                分类
                            </td> -->
                            <td class="am-text-middle am-lg-text-center" v-if="item.uid ==0">
                               游客

                            </td>
                            <td class="am-text-middle am-lg-text-center" v-if="item.uid > 0">
                                {{item.nickname}}

                            </td>
                           
                            <!-- <td class="am-text-middle am-lg-text-center">{{item.mark ? item.mark : '--'}}</td> -->
                            <!-- <td class="am-text-middle am-lg-text-center">{{item.dealt == 1 ? '已处理' : '待处理'}}</td> -->
                            <!-- <td class="am-text-middle am-lg-text-center">{{item.full_mark}}</td> -->
                            <!-- <td class="am-text-middle am-lg-text-center">{{item.pass_mark}}</td> -->
                            <!-- <td class="am-text-middle am-lg-text-center">
                                {{item.pass ? (item.pass == 1 ? '及格' : '不及格') : '--'}}
                            </td> -->
                            <td class="am-text-middle am-lg-text-center">{{item.create_time}}</td>
                            <td class="am-text-middle am-lg-text-center">
                                <div class="tpl-table-black-operation ">
                                    <a class="j-recharge tpl-table-black-operation-default"
                                       :href="'__CDN__/FQfZvLoCyH.php/question_format/getDealQuestionnaireData?qid='+item.qid+'&ids='+item.id"
                                       title="查看问卷数据/处理问卷"
                                    >
                                        <i class="am-icon-search"></i>
                                        查看问卷数据
                                    </a>
                                </div>
                            </td>
                        </tr>
                        <tr v-if="data.total ==0">
                            <td colspan="13" class="am-text-center">暂无记录</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="am-u-lg-12 am-cf">
                    <div class="am-fr"></div>
                    <div class="am-fr pagination-total am-margin-right">
                        <div class="am-vertical-align-middle">分类总数：{{data.total}}</div>
                    </div>
                </div>


            </div>
        </div>
    </div>
</div>

<script src="__CDN__/assets/js/vue.min.js"></script>
<script>
    var qVue = new Vue({
        el: '#questionnaire',
        data: {
            data: <?= json_encode($list) ?>,
            classes: <?= json_encode($classes) ?>
        },
        methods:{
            format(nS){
                console.log(nS)
                var date = new Date(nS);
                var y = date.getFullYear(),
                    m = date.getMonth() + 1,
                    d = date.getDate(),
                    h = date.getHours(),
                    i = date.getMinutes(),
                    s = date.getSeconds();
                if (m < 10) { m = '0' + m; }
                if (d < 10) { d = '0' + d; }
                if (h < 10) { h = '0' + h; }
                if (i < 10) { i = '0' + i; }
                if (s < 10) { s = '0' + s; }
                var t = y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s;
                return t;
                
            },

            
        }
    });


</script>
